package br.com.mmm.javacenter.framework.util;

public class Atributo {
	private String name;
	private String value;
	
	
	public Atributo(String name, Object value) {
		super();
		if(value == null){
			throw new IllegalArgumentException("value null");
		}
		
		this.name = name;
		this.value = value.toString();
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	public String toString() {
		if(value == null || "".equals(value)){
			return "";
		}else{
			return name + "=\"" + value + "\"";
		}
	}
}
